package com.wanmait.baohan.mapper;


import com.wanmait.baohan.pojo.TravelApproval;
import org.apache.ibatis.annotations.Param;

import java.sql.Timestamp;
import java.util.Date;
import java.util.List;

public interface TravelApprovalMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(TravelApproval record);

    int insertSelective(TravelApproval record);

    TravelApproval selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(TravelApproval record);

    int updateByPrimaryKey(TravelApproval record);


    //高文强 查出所有的的审批订单
    List<TravelApproval> selectAllTravelApproval() ;

    //高文强 根据审批表的id查出所有的信息
    TravelApproval selectTravelApprovalById(@Param("id") Integer id);

    //高文强  查出每个审批单最后的审批结果
    List<TravelApproval>  findOutTheFinalApprovalRresultOfEachApprovalForm(@Param("node")Integer node );

    //高文强  根据审批单数组查出所有的审批单
    TravelApproval  findOutTheFinalApprovalRresultOfEachApprovalFormById(@Param("id") Integer id, @Param("time") Timestamp time);


    //高文强   根据申请单id查找所有的审批单
    List<TravelApproval> findApprovalToApplicationById(@Param("id") Integer id);

    //高文强 修改审批状态
    void modifyApprovalStatus (TravelApproval travelApproval);


}